added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2010 / CSDynamicsNAVWebServices / Web References / NAVCodeunitWS / Reference.cs
blobf13fb0ec95ec5936f1b9764378d645f53b3e7ab2
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:4.0.30319.1
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
11 //
12 // This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.1.
13 //
14 #pragma warning disable 1591
16 namespace NAVWebServicesSampleCode.NAVCodeunitWS {
17 using System;
18 using System.Web.Services;
19 using System.Diagnostics;
20 using System.Web.Services.Protocols;
21 using System.ComponentModel;
22 using System.Xml.Serialization;
25 /// <remarks/>
26 // CODEGEN: No methods were found in the WSDL for this protocol.
27 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
28 [System.Diagnostics.DebuggerStepThroughAttribute()]
29 [System.ComponentModel.DesignerCategoryAttribute("code")]
30 [System.Web.Services.WebServiceBindingAttribute(Name="NAVCodeunit_Binding", Namespace="urn:microsoft-dynamics-schemas/codeunit/NAVCodeunit")]
31 public partial class NAVCodeunit : System.Web.Services.Protocols.SoapHttpClientProtocol {
33 private bool useDefaultCredentialsSetExplicitly;
35 /// <remarks/>
36 public NAVCodeunit() {
37 this.Url = global::NAVWebServicesSampleCode.Properties.Settings.Default.NAVWebServicesSampleCode_NAVCodeunitWS_NAVCodeunit;
38 if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
39 this.UseDefaultCredentials = true;
40 this.useDefaultCredentialsSetExplicitly = false;
42 else {
43 this.useDefaultCredentialsSetExplicitly = true;
47 public new string Url {
48 get {
49 return base.Url;
51 set {
52 if ((((this.IsLocalFileSystemWebService(base.Url) == true)
53 && (this.useDefaultCredentialsSetExplicitly == false))
54 && (this.IsLocalFileSystemWebService(value) == false))) {
55 base.UseDefaultCredentials = false;
57 base.Url = value;
61 public new bool UseDefaultCredentials {
62 get {
63 return base.UseDefaultCredentials;
65 set {
66 base.UseDefaultCredentials = value;
67 this.useDefaultCredentialsSetExplicitly = true;
71 private bool IsLocalFileSystemWebService(string url) {
72 if (((url == null)
73 || (url == string.Empty))) {
74 return false;
76 System.Uri wsUri = new System.Uri(url);
77 if (((wsUri.Port >= 1024)
78 && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
79 return true;
81 return false;
86 #pragma warning restore 1591